Optimal. Leaf size=126 \[ \cos \left (a-b \sqrt {c}\right ) \text {CosIntegral}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\cos \left (a+b \sqrt {c}\right ) \text {CosIntegral}\left (b \sqrt {c}-b \sqrt {c+d x}\right )-\sin \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\sin \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3513, 3384,
3380, 3383} \begin {gather*} \cos \left (a-b \sqrt {c}\right ) \text {CosIntegral}\left (b \left (\sqrt {c+d x}+\sqrt {c}\right )\right )+\cos \left (a+b \sqrt {c}\right ) \text {CosIntegral}\left (b \sqrt {c}-b \sqrt {c+d x}\right )-\sin \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\sin \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3380
Rule 3383
Rule 3384
Rule 3513
Rubi steps
\begin {align*} \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx &=\frac {2 \text {Subst}\left (\int \left (-\frac {d \cos (a+b x)}{2 \left (\sqrt {c}-x\right )}+\frac {d \cos (a+b x)}{2 \left (\sqrt {c}+x\right )}\right ) \, dx,x,\sqrt {c+d x}\right )}{d}\\ &=-\text {Subst}\left (\int \frac {\cos (a+b x)}{\sqrt {c}-x} \, dx,x,\sqrt {c+d x}\right )+\text {Subst}\left (\int \frac {\cos (a+b x)}{\sqrt {c}+x} \, dx,x,\sqrt {c+d x}\right )\\ &=\cos \left (a-b \sqrt {c}\right ) \text {Subst}\left (\int \frac {\cos \left (b \sqrt {c}+b x\right )}{\sqrt {c}+x} \, dx,x,\sqrt {c+d x}\right )-\cos \left (a+b \sqrt {c}\right ) \text {Subst}\left (\int \frac {\cos \left (b \sqrt {c}-b x\right )}{\sqrt {c}-x} \, dx,x,\sqrt {c+d x}\right )-\sin \left (a-b \sqrt {c}\right ) \text {Subst}\left (\int \frac {\sin \left (b \sqrt {c}+b x\right )}{\sqrt {c}+x} \, dx,x,\sqrt {c+d x}\right )-\sin \left (a+b \sqrt {c}\right ) \text {Subst}\left (\int \frac {\sin \left (b \sqrt {c}-b x\right )}{\sqrt {c}-x} \, dx,x,\sqrt {c+d x}\right )\\ &=\cos \left (a-b \sqrt {c}\right ) \text {Ci}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\cos \left (a+b \sqrt {c}\right ) \text {Ci}\left (b \sqrt {c}-b \sqrt {c+d x}\right )-\sin \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\sin \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.70, size = 145, normalized size = 1.15 \begin {gather*} \frac {1}{2} e^{-i \left (a+b \sqrt {c}\right )} \left (\text {Ei}\left (-i b \left (-\sqrt {c}+\sqrt {c+d x}\right )\right )+e^{2 i \left (a+b \sqrt {c}\right )} \text {Ei}\left (i b \left (-\sqrt {c}+\sqrt {c+d x}\right )\right )+e^{2 i b \sqrt {c}} \text {Ei}\left (-i b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+e^{2 i a} \text {Ei}\left (i b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(270\) vs.
\(2(102)=204\).
time = 0.07, size = 271, normalized size = 2.15
method | result | size |
derivativedivides | \(\frac {\frac {b \left (a +b \sqrt {c}\right ) \left (\sinIntegral \left (b \sqrt {c}-b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {c}\right )+\cosineIntegral \left (b \sqrt {d x +c}-b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )\right )}{\sqrt {c}}-\frac {b \left (a -b \sqrt {c}\right ) \left (-\sinIntegral \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\cosineIntegral \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )\right )}{\sqrt {c}}-2 b^{2} a \left (\frac {\sinIntegral \left (b \sqrt {c}-b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {c}\right )+\cosineIntegral \left (b \sqrt {d x +c}-b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )}{2 b \sqrt {c}}-\frac {-\sinIntegral \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\cosineIntegral \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )}{2 b \sqrt {c}}\right )}{b^{2}}\) | \(271\) |
default | \(\frac {\frac {b \left (a +b \sqrt {c}\right ) \left (\sinIntegral \left (b \sqrt {c}-b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {c}\right )+\cosineIntegral \left (b \sqrt {d x +c}-b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )\right )}{\sqrt {c}}-\frac {b \left (a -b \sqrt {c}\right ) \left (-\sinIntegral \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\cosineIntegral \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )\right )}{\sqrt {c}}-2 b^{2} a \left (\frac {\sinIntegral \left (b \sqrt {c}-b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {c}\right )+\cosineIntegral \left (b \sqrt {d x +c}-b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )}{2 b \sqrt {c}}-\frac {-\sinIntegral \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\cosineIntegral \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )}{2 b \sqrt {c}}\right )}{b^{2}}\) | \(271\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains complex when optimal does not.
time = 0.37, size = 149, normalized size = 1.18 \begin {gather*} \frac {1}{2} \, {\rm Ei}\left (i \, \sqrt {d x + c} b - \sqrt {-b^{2} c}\right ) e^{\left (i \, a + \sqrt {-b^{2} c}\right )} + \frac {1}{2} \, {\rm Ei}\left (i \, \sqrt {d x + c} b + \sqrt {-b^{2} c}\right ) e^{\left (i \, a - \sqrt {-b^{2} c}\right )} + \frac {1}{2} \, {\rm Ei}\left (-i \, \sqrt {d x + c} b - \sqrt {-b^{2} c}\right ) e^{\left (-i \, a + \sqrt {-b^{2} c}\right )} + \frac {1}{2} \, {\rm Ei}\left (-i \, \sqrt {d x + c} b + \sqrt {-b^{2} c}\right ) e^{\left (-i \, a - \sqrt {-b^{2} c}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos {\left (a + b \sqrt {c + d x} \right )}}{x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\cos \left (a+b\,\sqrt {c+d\,x}\right )}{x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________